<template>
  <div class="big-box">
      <div class="video">
          <!-- 作品显示区域 -->
          <div class="videoPinglun">
              <div class="videoPinglunWord">
                  <p>我的消息</p>
              </div>
              <div class="videoPinglunContent" >
                  <div class="pinglun" v-for="(item, index) in pinglunList" :key="item.id">
                      <div class="touxiang"><img :src="item.imgUrl" alt=""></div>
                      <div class="xiaoxi">
                          <div class="xiaoxi_div xiaoxi_div1">
                              <span class="name">{{item.nickName}}</span>
                              <span class="fabiao">{{item.msg}}</span>
                          </div>
                          <div class="xiaoxi_div xiaoxi_div2" style="height: 13px; display: inline-block">{{item.pl}}</div>
                          <div class="xiaoxi_div xiaoxi_div3">
                              <span class="xiaoxi_div3_span1" >{{item.date}}</span>
                              <span>{{item.time}}</span>
                              <a href="#" class="icon_a iconimg"><i class="el-icon-chat-round iconimg1"></i>回复</a>
                              <a href="#" class="icon_a iconimg"><i class="el-icon-thumb"></i>点赞</a>
                              <a href="#" class="icon_a iconimg icon_shanchu" @click="shanchu(index)"><i class="el-icon-delete"></i>删除通知</a>
                          </div>
                      </div>
                      <div class="fengmian">
                          <img :src="item.videoImg" alt="">
                      </div>
                  </div>
              </div>
          </div>
      </div>
  </div>
</template>

<script>
import {request} from "../../network/request";

export default {
    data(){
        return{
            pinglunList:[],

        }
    },

    methods:{
        shanchu(num){
            this.pinglunList.splice(num,1);
        }
    },
    created() {
        request({
            url:"/getAllSysNotify",
            method: "post",
            params:{
                userId:parseInt(sessionStorage.getItem("userId"))
            }
        }).then(res=>{
            //console.log(res.data);
            this.pinglunList = res.data;

        }).catch(err=>{
            //alert(err);
            console.log(err);
        });
        request({
            url:"/updateState",
            method: "post",
            params:{
                userId:parseInt(sessionStorage.getItem("userId"))
            }
        }).then(res=>{
            console.log(res.data);


        }).catch(err=>{
            //alert(err);
            console.log(err);
        });
    }

}
</script>

<style>
    ::-webkit-scrollbar {
        width:5px;

    }

    /* 滚动槽 */
    ::-webkit-scrollbar-track {
        border-radius:5px;
    }

    /* 滚动条滑块 */
    ::-webkit-scrollbar-thumb {
        border-radius:10px;
        background: #e8eaf1;
    }
    .big-box{
        width: 100%;
        height: 878px;
        background: url(http://www.handsomehuang.cn:8081/img2/3.jpg) top/cover no-repeat fixed;
        padding-top: 20px;
    }
    .video{
        width: 1000px;
        height: 800px;
        background-color: white;
        margin: 0 auto;
        overflow: auto;
        opacity: 0.8;
    }

    .video:after{
        clear: both;
    }


    .videoType ul{
        list-style: none;
    }

    .videoType li{
        width: 175px;   height: 50px;
        line-height: 50px;
        margin-left: 0;
       
    }

    .videoType li:hover{
        background-color: skyblue;
    }

    .videoPinglun{
        width: 775px;
        height: 600px;
        float: left;
        margin-top: 50px;
    }


    .videoPinglunWord{
        width: 100%;    height: 20px;
    }

    .videoPinglunWord p{
        float: left;
        margin-left: 25px;
    }

    .videoPinglunContent{
        width: 100%;    height: 500px;
        margin: 0 auto;
        padding: 24px 16px;
    }

    .pinglun{
        width: 99%;    height: 80px;
        text-align: left;
        margin-bottom: 10px;
        cursor: pointer;
    }

    .pinglun:hover .icon_shanchu{
        display: inline;
    }

    .touxiang{
        float: left;
    }

    .touxiang img{
        width: 40px;        height: 40px;
        border-radius: 100%;
    }

    .xiaoxi{
        margin-left: 24px;
        float: left;
    }

    .xiaoxi_div{
        margin-bottom: 10px;
    }

    .xiaoxi_div2{
        font-size: 13px;
        color: #222222;
        font-family: '微软雅黑';
    }

    .xiaoxi_div3{
        font-size: 11px;
        color: #999999;
        font-family: '微软雅黑';
    }

    .xiaoxi_div3_span1{
        margin-right: 5px;
    }

    .name{
        font-size: 13px;
        font-family: '微软雅黑';
        font-weight: bold;
        color: #222222;
        margin-right: 10px;
    }

    .name:hover{
        color:  rgb(47,174,227);
    }

    .fabiao{
        font-size: 13px;
        color: #505050;
        font-family: '微软雅黑';
    }

    .iconimg1{
        margin-left: 20px;
    }

    .iconimg{
        margin-right: 5px;
    }

    .icon_a{
        text-decoration: none;
        color: #999999;
    }

    .icon_a:hover{
        color: rgb(47,174,227);
    }

    .icon_shanchu{
        display: none;
    }

    .fengmian{
        float: right;
    }

    .fengmian img{
        width: 60px;
        height: 60px;
    }


    .shanchu button{
        width: 100px;
        height: 20px;
        text-align: center; 
        background-color: rgb(245,108,108);
        border-radius: 50px;
        color: rgb(255,255,255);
        border: 0;
        cursor: pointer;
        float: right;
    }

    .shanchu button:hover{
        border: 0.5px solid white;
        border-radius: 5%;
    }
</style>